#include <cstdio>
#include <algorithm>
using namespace std;
int a[22];
int main(void){
    a[1]=1;
    a[2]=2;
    for(int i=3;i<=20;i++){
        a[i]=a[i-1]+a[i-2];
    }
    int n;
    int t;
    scanf("%d",&t);
    while(t--){
        scanf("%d",&n);
        printf("%d\n",a[n]);
    }
    return 0;
}
